package controller;

import view.MainFrame;
import view.MainFrame.GlassPaneState;
import abstraction.ToolBarButton;

public class ToolBarController {

	public static void setSelected(ToolBarButton butSrc) {
		MainFrame.getInstance().setInactiveAll();
		butSrc.setActive();
	}

	/**
	 * set the mainframe glasspane visible
	 */
	public static void glassPaneOn() {
		MainFrame.getInstance().getToolBar().setVisible(false);
	}

	/**
	 * set the mainframe glasspane not visible and put the default one
	 */
	public static void glassPaneOff() {
		MainFrame.getInstance().setGlassPane(GlassPaneState.DEFAULT);
		MainFrame.getInstance().getToolBar().setVisible(true);
	}

}
